diff --git a/base/adventurer/configuration.nix b/base/adventurer/configuration.nix new file mode 100644 index 0000000..1902634 --- /dev/null +++ b/base/adventurer/configuration.nix @@ -0,0 +1,138 @@ +# 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, fetchFromGitLab, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + # Bootloader. + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/sda"; + boot.loader.grub.useOSProber = true; + powerManagement.cpuFreqGovernor = "performance"; + nix.settings.experimental-features = "nix-command flakes"; + programs.dconf.enable = true; + services.fprintd.enable = true; + networking.hostName = "adventurer"; # Define your hostname. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + environment.variables = { + WLR_NO_HARDWARE_CURSORS = "1"; + PASSWORD_STORE_DIR = "/home/maya/sync/general/pass"; + }; + programs.gnupg.agent.enable = true; + programs.steam.enable = true; + # 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; + + # Set your time zone. + time.timeZone = "Australia/Perth"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_AU.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_AU.UTF-8"; + LC_IDENTIFICATION = "en_AU.UTF-8"; + LC_MEASUREMENT = "en_AU.UTF-8"; + LC_MONETARY = "en_AU.UTF-8"; + LC_NAME = "en_AU.UTF-8"; + LC_NUMERIC = "en_AU.UTF-8"; + LC_PAPER = "en_AU.UTF-8"; + LC_TELEPHONE = "en_AU.UTF-8"; + LC_TIME = "en_AU.UTF-8"; + }; + + # Enable the X11 windowing system. + # You can disable this if you're only using the Wayland session. + services.xserver.enable = true; + + # Enable the KDE Plasma Desktop Environment. + + # Configure keymap in X11 + services.xserver.xkb = { + layout = "us"; + variant = ""; + }; + + # 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; + pulse.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) + #media-session.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.maya = { + isNormalUser = true; + description = "Maya Wren"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; [ + # thunderbird + ]; + }; + # Install firefox. + programs.firefox.enable = true; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + # wget + neovim + git + ]; + + # 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; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + # 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.11"; # Did you read the comment? + +} diff --git a/base/adventurer/default.nix b/base/adventurer/default.nix new file mode 100644 index 0000000..a94a618 --- /dev/null +++ b/base/adventurer/default.nix @@ -0,0 +1,12 @@ +{config, pkgs, ...}:{ + imports = [ + ./configuration.nix + ../overrides.nix + ../ssh.nix + ../firewall.nix + ../substituters.nix + ../fonts.nix + ../udev.nix + ../greetd.nix + ]; +} diff --git a/base/adventurer/hardware-configuration.nix b/base/adventurer/hardware-configuration.nix new file mode 100644 index 0000000..adb8718 --- /dev/null +++ b/base/adventurer/hardware-configuration.nix @@ -0,0 +1,37 @@ +# 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 = [ "uhci_hcd" "ehci_pci" "ata_piix" "ahci" "firewire_ohci" "usb_storage" "usbhid" "sd_mod" "sr_mod" "sdhci_pci" ]; + #boot.initrd.kernelModules = [ "nvidia" ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.kernelPackages = pkgs.linuxPackages_zen; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/be6662d9-e9c6-48a2-9557-672f5307816f"; + fsType = "ext4"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/87a05a1d-e62d-4882-ad5a-e2e6324671da"; } + ]; + + # 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.enp0s29f7u2.useDHCP = lib.mkDefault true; + # networking.interfaces.enp9s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp12s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + networking.enableIntel3945ABGFirmware = true; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/base/apollo/configuration.nix b/base/apollo/configuration.nix index 0607f75..8f9bd8c 100644 --- a/base/apollo/configuration.nix +++ b/base/apollo/configuration.nix @@ -81,6 +81,7 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9008", MODE="0666 LC_TELEPHONE = "en_AU.UTF-8"; LC_TIME = "en_AU.UTF-8"; }; +<<<<<<< HEAD nix.settings.experimental-features = [ "nix-command" "flakes" ]; services.greetd = { enable = true; @@ -107,6 +108,8 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9008", MODE="0666 TTYHangup = "true"; TTYVTDisallocate = "true"; }; +======= +>>>>>>> 6c567ff (help) # Enable the X11 windowing system. services.xserver.enable = true; diff --git a/base/apollo/default.nix b/base/apollo/default.nix index 1749f88..a94a618 100644 --- a/base/apollo/default.nix +++ b/base/apollo/default.nix @@ -7,5 +7,6 @@ ../substituters.nix ../fonts.nix ../udev.nix + ../greetd.nix ]; } diff --git a/base/greetd.nix b/base/greetd.nix new file mode 100644 index 0000000..1990877 --- /dev/null +++ b/base/greetd.nix @@ -0,0 +1,19 @@ +{pkgs, ...}:{ + services.greetd = { + enable = true; + restart = true; + settings.default_session = { + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd sway"; + user = "greeter"; + }; + }; + systemd.services.greetd.serviceConfig = { + Type = "idle"; + StandardInput = "tty"; + StandardOutput = "tty"; + StandardError = "journal"; + TTYReset = "true"; + TTYHangup = "true"; + TTYVTDisallocate = "true"; + }; +} diff --git a/base/hypermac/configuration.nix b/base/hypermac/configuration.nix index cacfbde..b82c88d 100644 --- a/base/hypermac/configuration.nix +++ b/base/hypermac/configuration.nix @@ -22,28 +22,11 @@ }; programs.sway.enable = true; - services.greetd = { - enable = true; - restart = true; - settings.default_session = { - command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time"; - user = "greeter"; - }; - }; programs.adb.enable = true; environment.variables = { WLR_NO_HARDWARE_CURSORS = "1"; }; - systemd.services.greetd.serviceConfig = { - Type = "idle"; - StandardInput = "tty"; - StandardOutput = "tty"; - StandardError = "journal"; - TTYReset = "true"; - TTYHangup = "true"; - TTYVTDisallocate = "true"; - }; networking.hostName = "hypermac"; # Define your hostname. # Pick only one of the below networking options. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. diff --git a/base/hypermac/default.nix b/base/hypermac/default.nix index ac61773..4c1eb4b 100644 --- a/base/hypermac/default.nix +++ b/base/hypermac/default.nix @@ -6,5 +6,6 @@ ../firewall.nix ../substituters.nix ../fonts.nix + ../greetd.nix ]; } diff --git a/flake.lock b/flake.lock index d6c2f76..671de48 100644 --- a/flake.lock +++ b/flake.lock @@ -195,6 +195,22 @@ "type": "github" } }, + "nixpkgs-test": { + "locked": { + "lastModified": 1741851582, + "narHash": "sha256-cPfs8qMccim2RBgtKGF+x9IBCduRvd/N5F4nYpU0TVE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6607cf789e541e7873d40d3a8f7815ea92204f32", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1660551188, @@ -212,11 +228,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1740560979, - "narHash": "sha256-Vr3Qi346M+8CjedtbyUevIGDZW8LcA1fTG0ugPY/Hic=", + "lastModified": 1741851582, + "narHash": "sha256-cPfs8qMccim2RBgtKGF+x9IBCduRvd/N5F4nYpU0TVE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5135c59491985879812717f4c9fea69604e7f26f", + "rev": "6607cf789e541e7873d40d3a8f7815ea92204f32", "type": "github" }, "original": { @@ -293,6 +309,7 @@ "nix-system-graphics": "nix-system-graphics", "nixgl": "nixgl", "nixpkgs": "nixpkgs_3", + "nixpkgs-test": "nixpkgs-test", "nixvim": "nixvim", "system-manager": "system-manager" } diff --git a/flake.nix b/flake.nix index 4e3ca5e..1b084a1 100644 --- a/flake.nix +++ b/flake.nix @@ -3,6 +3,7 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs-test.url = "github:NixOS/nixpkgs/nixos-unstable"; nixgl.url = "github:nix-community/nixGL"; home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; @@ -20,7 +21,7 @@ }; }; - outputs = inputs@{ self, nixpkgs, home-manager, system-manager, ...}:{ + outputs = inputs@{ self, nixpkgs, nixpkgs-test, home-manager, system-manager, ...}:{ nixosConfigurations."apollo" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ @@ -80,9 +81,29 @@ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.maya = ./home; - }]; - }; - + } + ]; + }; + nixosConfigurations."adventurer" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./base/adventurer + home-manager.nixosModules.home-manager { + home-manager.extraSpecialArgs = { + inherit inputs; + vars = { + isNixOS = true; + class = "lowspec"; + user = "maya"; + useSyncthing = true; + }; + }; + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.maya = ./home; + } + ]; + }; #other confs go here, cant be assed rn homeConfigurations.generic = home-manager.lib.homeManagerConfiguration { pkgs = import nixpkgs { system = "x86_64-linux"; overlays = [inputs.nixgl.overlay]; }; diff --git a/home/sway.nix b/home/sway.nix index f8aa82f..265e292 100644 --- a/home/sway.nix +++ b/home/sway.nix @@ -1,9 +1,9 @@ -{lib, osConfig, pkgs, inputs, ...}:{ +{lib, osConfig, pkgs, vars, inputs, ...}:{ wayland.windowManager.sway = { package = pkgs.swayfx; enable = true; checkConfig = false; #gles2 renderer error - extraConfig = import ./swayfx; + extraConfig = if (vars.class != "lowspec") then import ./swayfx else ""; config = { modifier = "Mod4"; terminal = "foot"; diff --git a/home/swayfx-lite b/home/swayfx-lite new file mode 100644 index 0000000..f990b58 --- /dev/null +++ b/home/swayfx-lite @@ -0,0 +1,13 @@ +" +for_window [app_id=\"foot\"] opacity 0.8 +for_window [app_id=\"waybar\"] blur enable +blur disable +corner_radius 10 +# shadows enable - not using this because of flicker +default_dim_inactive 0.3 +client.focused 000000 cba6f7 000000 cba6f7 +for_window [title=\"Picture-in-Picture\"] dim_inactive 0.0 +for_window [title=\"Picture-in-Picture\"] sticky enable +client.focused_inactive 000000 440C88 000000 440C88 +client.unfocused 000000 440C88 000000 440C88 +" diff --git a/home/waybar/config b/home/waybar/config index 4071761..5332e64 100644 --- a/home/waybar/config +++ b/home/waybar/config @@ -42,7 +42,11 @@ }, "group/audio": { "orientation": "inherit", +<<<<<<< HEAD "modules": ["wireplumber", ], +======= + "modules": ["wireplumber"], +>>>>>>> 6c567ff (help) "on-click": "pavucontrol", }, "group/mpdg": {