From c8036f9a5533418d2c86b39be820395b1038fd5e Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Mon, 5 Aug 2024 20:43:13 -0500 Subject: [PATCH 01/11] Add Factorio client to oscar --- oscar/configuration.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/oscar/configuration.nix b/oscar/configuration.nix index 47b7d01..05bdf4d 100644 --- a/oscar/configuration.nix +++ b/oscar/configuration.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: { imports = @@ -12,6 +12,10 @@ ]; + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "factorio-alpha" + ]; + # https://discourse.nixos.org/t/github-strategies-for-configuration-nix/1983/14 nix.nixPath = [ "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos" @@ -160,6 +164,7 @@ 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 + factorio ]; # Some programs need SUID wrappers, can be configured further or are From 07bd6b1e332d019fe6aa1c3d8cd61970367b0bce Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Mon, 5 Aug 2024 20:44:38 -0500 Subject: [PATCH 02/11] Add steam --- oscar/configuration.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/oscar/configuration.nix b/oscar/configuration.nix index 05bdf4d..67b7c12 100644 --- a/oscar/configuration.nix +++ b/oscar/configuration.nix @@ -14,6 +14,9 @@ nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "factorio-alpha" + "steam" + "steam-original" + "steam-run" ]; # https://discourse.nixos.org/t/github-strategies-for-configuration-nix/1983/14 @@ -177,6 +180,8 @@ programs.ssh.startAgent = true; + programs.steam.enable = true; + # List services that you want to enable: services.fprintd.enable = true; From 3e1c66d163bf5cf10b85f743648c4a140b294458 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Mon, 5 Aug 2024 21:03:33 -0500 Subject: [PATCH 03/11] Add Discord to oscar --- oscar/configuration.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/oscar/configuration.nix b/oscar/configuration.nix index 67b7c12..1f6dae8 100644 --- a/oscar/configuration.nix +++ b/oscar/configuration.nix @@ -17,6 +17,7 @@ "steam" "steam-original" "steam-run" + "discord" ]; # https://discourse.nixos.org/t/github-strategies-for-configuration-nix/1983/14 @@ -167,6 +168,7 @@ 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 + discord factorio ]; From d842379e9140af1fe05fb3664e8c0218cc3775f0 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Sun, 18 Aug 2024 17:55:31 -0500 Subject: [PATCH 04/11] Enable plymouth boot Currently, doesn't have a GUI for LUKS key entry, and isn't flicker-free, which is potential future direction for improvement. --- oscar/configuration.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/oscar/configuration.nix b/oscar/configuration.nix index 1f6dae8..c2cd04f 100644 --- a/oscar/configuration.nix +++ b/oscar/configuration.nix @@ -31,6 +31,9 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; + boot.plymouth.enable = true; + boot.plymouth.theme = "breeze"; + boot.initrd.luks.devices."luks-ca2fdf0b-d385-498c-9f7d-f58368a65fd4".device = "/dev/disk/by-uuid/ca2fdf0b-d385-498c-9f7d-f58368a65fd4"; networking.hostName = "oscar"; # Define your hostname. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. From a34bc61fe680b7dab483b8675beadd403bbfb21a Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Sun, 18 Aug 2024 17:56:52 -0500 Subject: [PATCH 05/11] Enable atd, for the `at` command 2024 VBS: echo "aplay /home/chandler/vbs/transition.wav" | at 19:57 --- oscar/configuration.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/oscar/configuration.nix b/oscar/configuration.nix index c2cd04f..bdaeafc 100644 --- a/oscar/configuration.nix +++ b/oscar/configuration.nix @@ -79,6 +79,8 @@ # Enable CUPS to print documents. services.printing.enable = true; + services.atd.enable = true; + services.hardware.bolt.enable = true; virtualisation.docker.enable = true; From 534c0da01b33a4194bda6cd0ebd194b3d910ce40 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Sun, 15 Sep 2024 20:53:42 -0500 Subject: [PATCH 06/11] Remove no-longer-used sound.enable flag https://github.com/NixOS/nixpkgs/pull/326262 --- oscar/configuration.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/oscar/configuration.nix b/oscar/configuration.nix index bdaeafc..9979570 100644 --- a/oscar/configuration.nix +++ b/oscar/configuration.nix @@ -88,7 +88,6 @@ hardware.bluetooth.enable = true; # Enable sound with pipewire. - sound.enable = true; hardware.pulseaudio.enable = false; security.rtkit.enable = true; services.pipewire = { From 9d5f93226903fdf6894f3c74bda23e7426de51b2 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Sun, 15 Sep 2024 20:54:47 -0500 Subject: [PATCH 07/11] Enable Ozone for chromium-based apps --- oscar/configuration.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/oscar/configuration.nix b/oscar/configuration.nix index 9979570..0e5b292 100644 --- a/oscar/configuration.nix +++ b/oscar/configuration.nix @@ -106,6 +106,8 @@ # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; + environment.sessionVariables.NIXOS_OZONE_WL = "1"; + # Define a user account. Don't forget to set a password with ‘passwd’. users.users.chandler.isNormalUser = true; users.users.chandler.description = "Chandler Swift"; From 6f10416cdd0f59895530afb2a50ce23e71912e13 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Sun, 15 Sep 2024 20:55:07 -0500 Subject: [PATCH 08/11] Add chandler to cdrom group for CD ripping --- oscar/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oscar/configuration.nix b/oscar/configuration.nix index 0e5b292..66241ad 100644 --- a/oscar/configuration.nix +++ b/oscar/configuration.nix @@ -111,7 +111,7 @@ # Define a user account. Don't forget to set a password with ‘passwd’. users.users.chandler.isNormalUser = true; users.users.chandler.description = "Chandler Swift"; - users.users.chandler.extraGroups = [ "networkmanager" "wheel" "dialout" ]; + users.users.chandler.extraGroups = [ "networkmanager" "wheel" "dialout" "cdrom" ]; home-manager.users.chandler = { pkgs, ... }: { home.packages = with pkgs; [ firefox From 08958c0a78f8dbc27cc2ee9cfaddce1e5a13ba9b Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Sun, 15 Sep 2024 21:52:21 -0500 Subject: [PATCH 09/11] Manage Firefox with home-manager I'm not exactly sure how to manage profiles; I wasn't able to get this to work so I just ended up managing profiles manually. --- oscar/configuration.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/oscar/configuration.nix b/oscar/configuration.nix index 66241ad..23d0fd6 100644 --- a/oscar/configuration.nix +++ b/oscar/configuration.nix @@ -114,7 +114,6 @@ users.users.chandler.extraGroups = [ "networkmanager" "wheel" "dialout" "cdrom" ]; home-manager.users.chandler = { pkgs, ... }: { home.packages = with pkgs; [ - firefox kate prismlauncher libreoffice-qt @@ -166,6 +165,18 @@ signing.key = null; # "let GnuPG decide what signing key to use depending on commit's author" }; + programs.firefox = { + enable = true; +# profiles = { +# default = { +# id = 0; +# name = "default"; +# isDefault = true; +# search.default = "DuckDuckGo"; +# }; +# }; + }; + home.stateVersion = "23.11"; }; From 3fc3bd97f3c8221df22bf5415c923e4487846864 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Sun, 15 Sep 2024 21:56:05 -0500 Subject: [PATCH 10/11] Add binfmt config for aarch64 This may be able to be refactored once this PR is merged: https://github.com/NixOS/nixpkgs/pull/334859 This configuration is based on this config: https://github.com/jcaesar/sysflake/blob/182ca2c66ff0d1bcd4ba5f3032cca97bbb32da59/mod/binfmt.nix linked from this comment: https://github.com/NixOS/nixpkgs/issues/160300#issuecomment-2156003171 --- oscar/configuration.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/oscar/configuration.nix b/oscar/configuration.nix index 23d0fd6..476881e 100644 --- a/oscar/configuration.nix +++ b/oscar/configuration.nix @@ -34,6 +34,13 @@ boot.plymouth.enable = true; boot.plymouth.theme = "breeze"; + boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; + boot.binfmt.registrations.aarch64-linux = { + interpreter = "${pkgs.pkgsStatic.qemu-user.override { hostCpuTargets = ["aarch64-linux-user"]; }}/bin/qemu-aarch64"; + wrapInterpreterInShell = false; + fixBinary = true; + }; + boot.initrd.luks.devices."luks-ca2fdf0b-d385-498c-9f7d-f58368a65fd4".device = "/dev/disk/by-uuid/ca2fdf0b-d385-498c-9f7d-f58368a65fd4"; networking.hostName = "oscar"; # Define your hostname. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. From 1182eafec8adfb9815750feec8da01498809b3dc Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Sun, 15 Sep 2024 21:58:53 -0500 Subject: [PATCH 11/11] Update gitconfig --- oscar/configuration.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/oscar/configuration.nix b/oscar/configuration.nix index 476881e..fc035c8 100644 --- a/oscar/configuration.nix +++ b/oscar/configuration.nix @@ -157,6 +157,8 @@ url."ssh://aur@aur.archlinux.org/".pushInsteadOf = "aur:"; url."ssh://git@github.com/ChandlerSwift/".insteadOf = "gh:"; push.autoSetupRemote = true; + rebase.autosquash = true; + fetch.parallel = 0; # "some reasonable default" }; ignores = [ "*.kate-swp"