diff --git a/flake.lock b/flake.lock index 8026258..3e046db 100644 --- a/flake.lock +++ b/flake.lock @@ -214,6 +214,27 @@ "type": "github" } }, + "jovian": { + "inputs": { + "nix-github-actions": "nix-github-actions", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1700979728, + "narHash": "sha256-Myh4f+pXVDPrxw96K1czQZJv6fqZVdaXkzyyyR+H9ro=", + "owner": "jovian-experiments", + "repo": "jovian-nixos", + "rev": "4599d9edef37dec460cc08e85da6c699ac0d78fd", + "type": "github" + }, + "original": { + "owner": "jovian-experiments", + "repo": "jovian-nixos", + "type": "github" + } + }, "lanzaboote": { "inputs": { "crane": "crane", @@ -243,6 +264,28 @@ "type": "github" } }, + "nix-github-actions": { + "inputs": { + "nixpkgs": [ + "jovian", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1690328911, + "narHash": "sha256-fxtExYk+aGf2YbjeWQ8JY9/n9dwuEt+ma1eUFzF8Jeo=", + "owner": "zhaofengli", + "repo": "nix-github-actions", + "rev": "96df4a39c52f53cb7098b923224d8ce941b64747", + "type": "github" + }, + "original": { + "owner": "zhaofengli", + "ref": "matrix-name", + "repo": "nix-github-actions", + "type": "github" + } + }, "nix-index-database": { "inputs": { "nixpkgs": [ @@ -454,6 +497,7 @@ "inputs": { "fonts": "fonts", "home-manager": "home-manager", + "jovian": "jovian", "lanzaboote": "lanzaboote", "nix-index-database": "nix-index-database", "nixos-hardware": "nixos-hardware", diff --git a/flake.nix b/flake.nix index 3561343..59b9f85 100644 --- a/flake.nix +++ b/flake.nix @@ -31,11 +31,17 @@ inputs.nixpkgs.follows = "nixpkgs"; inputs.utils.follows = "utils"; }; + jovian = { + url = "github:jovian-experiments/jovian-nixos"; + inputs.nixpkgs.follows = "nixpkgs"; + + }; + private.url = "git+ssh://gitea@git.mildlyfunctional.gay/artemist/nixos-config-private?ref=unified"; }; - outputs = { self, nixpkgs, home-manager, private, utils, nixvim, ... }@inputs: + outputs = { self, nixpkgs, home-manager, utils, nixvim, ... }@inputs: let makeSystem = conf: nixpkgs.lib.nixosSystem (nixpkgs.lib.recursiveUpdate conf rec { @@ -61,6 +67,11 @@ modules = [ ./system/spike ]; }; + nixosConfigurations.gallus = makeSystem { + system = "x86_64-linux"; + modules = [ ./system/gallus ]; + }; + nixosConfigurations.mistmane = makeSystem { system = "aarch64-linux"; modules = [ ./system/mistmane ]; diff --git a/sets/nixvim.nix b/sets/nixvim.nix new file mode 100644 index 0000000..8b7cef1 --- /dev/null +++ b/sets/nixvim.nix @@ -0,0 +1,4 @@ +{ inputs, pkgs, ... }@args: { + imports = [ inputs.nixvim.nixosModules.nixvim ]; + programs.nixvim = import ./nvim.nix args // { enable = true; }; +} diff --git a/sets/workstation.nix b/sets/workstation.nix index 08952f5..04c3b66 100644 --- a/sets/workstation.nix +++ b/sets/workstation.nix @@ -10,7 +10,7 @@ ./pipewire.nix ./swap.nix ./sway.nix - inputs.nixvim.nixosModules.nixvim + ./nixvim.nix inputs.private.nixosModules.taskwarrior ]; @@ -23,8 +23,6 @@ variables.TERMINAL = "kitty"; }; - programs.nixvim = import ./nvim.nix args // { enable = true; }; - services = { avahi = { enable = true; diff --git a/system/.gitignore b/system/.gitignore deleted file mode 100644 index 5b9023a..0000000 --- a/system/.gitignore +++ /dev/null @@ -1 +0,0 @@ -current diff --git a/system/gallus/boot-config.nix b/system/gallus/boot-config.nix new file mode 100644 index 0000000..1ffd2db --- /dev/null +++ b/system/gallus/boot-config.nix @@ -0,0 +1,6 @@ +{ ... }: { + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; +} diff --git a/system/gallus/default.nix b/system/gallus/default.nix new file mode 100644 index 0000000..7a3dea2 --- /dev/null +++ b/system/gallus/default.nix @@ -0,0 +1,42 @@ +{ inputs, pkgs, ... }@args: + +{ + imports = [ + ./boot-config.nix + ./hardware-configuration.nix + ../../sets/sshd.nix + ../../sets/base.nix + ../../sets/wifi.nix + ../../home + inputs.jovian.nixosModules.default + ]; + + jovian = { + devices.steamdeck.enable = true; + decky-loader.enable = true; + steam = { + enable = true; + autoStart = true; + desktopSession = "gnome"; + user = "artemis"; + }; + }; + programs.steam.enable = true; + + hardware.bluetooth.enable = true; + + services.xserver.desktopManager.gnome.enable = true; + services.gnome = { + tracker-miners.enable = false; + tracker.enable = false; + }; + + services.avahi = { + enable = true; + nssmdns = true; + publish.enable = true; + }; + + networking.hostName = "gallus"; + system.stateVersion = "23.11"; +} diff --git a/system/gallus/hardware-configuration.nix b/system/gallus/hardware-configuration.nix new file mode 100644 index 0000000..6d836cf --- /dev/null +++ b/system/gallus/hardware-configuration.nix @@ -0,0 +1,46 @@ +# 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 = [ + "nvme" + "dwc3_pci" + "xhci_pci" + "usbhid" + "usb_storage" + "sd_mod" + "sdhci_pci" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/07eba495-97e8-4aa1-ba63-927951a9bb1c"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/D1BA-85D3"; + fsType = "vfat"; + }; + + swapDevices = + [{ device = "/dev/disk/by-uuid/6cdcaab1-a216-4615-89e7-75e99c1339bb"; }]; + + # 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.enp4s0f3u1u1c2.useDHCP = lib.mkDefault true; + # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; +}