summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjetil Orbekk <kj@orbekk.com>2023-09-23 14:07:05 -0400
committerKjetil Orbekk <kj@orbekk.com>2023-09-23 14:26:34 -0400
commit0c7bf6e5465d6b58dfdbdf00867cac99e40ed968 (patch)
tree15589521fc9234f83d790994412cdcdeb64ee0f9
parentf8b365fcc983b73eadf638ca4e664d5b9e323d4c (diff)
Update
-rw-r--r--flake.lock108
-rw-r--r--flake.nix5
-rw-r--r--machines/dex.nix69
-rw-r--r--modules/common.nix17
-rw-r--r--modules/desktop.nix2
5 files changed, 150 insertions, 51 deletions
diff --git a/flake.lock b/flake.lock
index 3d9204e..bda28be 100644
--- a/flake.lock
+++ b/flake.lock
@@ -9,11 +9,11 @@
]
},
"locked": {
- "lastModified": 1690228878,
- "narHash": "sha256-9Xe7JV0krp4RJC9W9W9WutZVlw6BlHTFMiUP/k48LQY=",
+ "lastModified": 1694793763,
+ "narHash": "sha256-y6gTE1C9mIoSkymRYyzCmv62PFgy+hbZ5j8fuiQK5KI=",
"owner": "ryantm",
"repo": "agenix",
- "rev": "d8c973fd228949736dedf61b7f8cc1ece3236792",
+ "rev": "572baca9b0c592f71982fca0790db4ce311e3c75",
"type": "github"
},
"original": {
@@ -51,11 +51,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
- "lastModified": 1692037570,
- "narHash": "sha256-bvj/wfLLFTc8cWAwhN8tgShiy8ekPWt1+gWlEH7W4zY=",
+ "lastModified": 1695149611,
+ "narHash": "sha256-RCxUQJ9uQdioFcHe2HYiJQBo3qVLBTzd3DTHRXLlVlM=",
"owner": "nix-community",
"repo": "emacs-overlay",
- "rev": "7a4b5bbc06182e2f704630cd77a614ab0d9c2f2e",
+ "rev": "aee5e8a427c8a942458d2bad7b97cbad30b75aec",
"type": "github"
},
"original": {
@@ -69,11 +69,11 @@
"systems": "systems"
},
"locked": {
- "lastModified": 1689068808,
- "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
+ "lastModified": 1694529238,
+ "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
- "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
+ "rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
@@ -103,13 +103,54 @@
"type": "github"
}
},
+ "jovian": {
+ "inputs": {
+ "nix-github-actions": "nix-github-actions",
+ "nixpkgs": "nixpkgs_2"
+ },
+ "locked": {
+ "lastModified": 1695152592,
+ "narHash": "sha256-AW4gs1IiQUOgnYs6N+v+6wWSQDKlwCBUJJ6aB0n9JPs=",
+ "owner": "Jovian-Experiments",
+ "repo": "Jovian-NixOS",
+ "rev": "e4e321a36922ee02682348b3e0eaa3c4a01deb31",
+ "type": "github"
+ },
+ "original": {
+ "owner": "Jovian-Experiments",
+ "repo": "Jovian-NixOS",
+ "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"
+ }
+ },
"nixos-hardware": {
"locked": {
- "lastModified": 1691871742,
- "narHash": "sha256-6yDNjfbAMpwzWL4y75fxs6beXHRANfYX8BNSPjYehck=",
+ "lastModified": 1695109627,
+ "narHash": "sha256-4rpyoVzmunIG6xWA/EonnSSqC69bDBzciFi6SjBze/0=",
"owner": "NixOS",
"repo": "nixos-hardware",
- "rev": "430a56dd16fe583a812b2df44dca002acab2f4f6",
+ "rev": "cb4dc98f776ddb6af165e6f06b2902efe31ca67a",
"type": "github"
},
"original": {
@@ -121,11 +162,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1691899779,
- "narHash": "sha256-IBf4KVr/UQJlzrqB2/IHtlvmwsvyIVLPerSzCPU/6Xk=",
+ "lastModified": 1694959747,
+ "narHash": "sha256-CXQ2MuledDVlVM5dLC4pB41cFlBWxRw4tCBsFrq3cRk=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "100a1550b0e7a64b960c625b656f9229bdef5f87",
+ "rev": "970a59bd19eff3752ce552935687100c46e820a5",
"type": "github"
},
"original": {
@@ -137,11 +178,11 @@
},
"nixpkgs-stable": {
"locked": {
- "lastModified": 1691950488,
- "narHash": "sha256-iUNEeudc4dGjx+HsHccnGiuZUVE/nhjXuQ1DVCsHIUY=",
+ "lastModified": 1694937365,
+ "narHash": "sha256-iHZSGrb9gVpZRR4B2ishUN/1LRKWtSHZNO37C8z1SmA=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "720e61ed8de116eec48d6baea1d54469b536b985",
+ "rev": "5d017a8822e0907fb96f7700a319f9fe2434de02",
"type": "github"
},
"original": {
@@ -153,11 +194,11 @@
},
"nixpkgs-unstable": {
"locked": {
- "lastModified": 1691990649,
- "narHash": "sha256-gMbKOiX1HwClRP9lADaaV/lnZr93NEaOFe4ApDx/zd8=",
+ "lastModified": 1694959747,
+ "narHash": "sha256-CXQ2MuledDVlVM5dLC4pB41cFlBWxRw4tCBsFrq3cRk=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "6e287913f7b1ef537c97aa301b67c34ea46b640f",
+ "rev": "970a59bd19eff3752ce552935687100c46e820a5",
"type": "github"
},
"original": {
@@ -169,11 +210,27 @@
},
"nixpkgs_2": {
"locked": {
- "lastModified": 1691950488,
- "narHash": "sha256-iUNEeudc4dGjx+HsHccnGiuZUVE/nhjXuQ1DVCsHIUY=",
+ "lastModified": 1690179384,
+ "narHash": "sha256-+arbgqFTAtoeKtepW9wCnA0njCOyoiDFyl0Q0SBSOtE=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "b12803b6d90e2e583429bb79b859ca53c348b39a",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs_3": {
+ "locked": {
+ "lastModified": 1694937365,
+ "narHash": "sha256-iHZSGrb9gVpZRR4B2ishUN/1LRKWtSHZNO37C8z1SmA=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "720e61ed8de116eec48d6baea1d54469b536b985",
+ "rev": "5d017a8822e0907fb96f7700a319f9fe2434de02",
"type": "github"
},
"original": {
@@ -187,8 +244,9 @@
"inputs": {
"agenix": "agenix",
"emacs-overlay": "emacs-overlay",
+ "jovian": "jovian",
"nixos-hardware": "nixos-hardware",
- "nixpkgs": "nixpkgs_2",
+ "nixpkgs": "nixpkgs_3",
"nixpkgs-unstable": "nixpkgs-unstable"
}
},
diff --git a/flake.nix b/flake.nix
index 6c5b917..b9165d1 100644
--- a/flake.nix
+++ b/flake.nix
@@ -5,9 +5,10 @@
inputs.emacs-overlay.url = "github:nix-community/emacs-overlay";
inputs.agenix.url = "github:ryantm/agenix";
inputs.agenix.inputs.nixpkgs.follows = "nixpkgs";
+ inputs.jovian.url = "github:Jovian-Experiments/Jovian-NixOS";
outputs =
- { self, nixpkgs, nixpkgs-unstable, nixos-hardware, emacs-overlay, agenix }:
+ { self, nixpkgs, nixpkgs-unstable, nixos-hardware, emacs-overlay, agenix, jovian }:
let
pkgs-module = { config, ... }:
let
@@ -77,7 +78,7 @@
(self.lastModifiedDate or self.lastModified or "19700101");
in "${lastModified}.${self.shortRev or "dirty"}";
})
- ];
+ ] ++ lib.optional (hostName == "dex") jovian.nixosModules.jovian;
};
};
myMachines = [
diff --git a/machines/dex.nix b/machines/dex.nix
index b06d450..db2928c 100644
--- a/machines/dex.nix
+++ b/machines/dex.nix
@@ -19,6 +19,35 @@ with lib;
HandlePowerKey=suspend
'';
+ # Enable the X11 windowing system.
+ services.xserver.enable = true;
+
+ services.xserver.displayManager.sddm.enable = lib.mkForce false; # Cannot use with jovian
+
+ # Steam setup
+ jovian.steam.autoStart = true;
+ jovian.steam.desktopSession = "river";
+ jovian.steam.enable = true;
+ jovian.steam.user = "orbekk";
+ jovian.devices.steamdeck.enable = true;
+
+ # Enable sound with pipewire.
+ sound.enable = true;
+ 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;
+ };
+
nix.gc.persistent = false;
networking.networkmanager.enable = true;
networking.hostName = "dex";
@@ -29,49 +58,41 @@ with lib;
security.pam.enableFscrypt = true;
- system.activationScripts.fix = ''
- chown root /
- '';
-
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = false;
- boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sdhci" "sdhci_pci" "cqhci" "mmc_block" ];
- boot.initrd.kernelModules = [ "amdgpu" ];
+ boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ];
+ boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
- boot.kernelPackages = pkgs.unstable.linuxPackages_latest;
- boot.kernelParams = [
- "amd_iommu=off"
- "amdgpu.gttsize=8128"
- "spi_amd.speed_dev=1"
- "audit=0"
- ];
- fileSystems."/" =
- { device = "/dev/disk/by-uuid/52d3077e-d1be-4976-a2ca-f2d879a808c1";
- fsType = "ext4";
- };
+ system.stateVersion = "23.05";
- fileSystems."/home" =
- { device = "/dev/disk/by-label/home";
+ # hardware-configuration
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/41d480f8-52e9-40d5-bd12-a3aa48ccf1b5";
fsType = "ext4";
};
fileSystems."/boot" =
- { device = "/dev/disk/by-uuid/D381-BD0D";
+ { device = "/dev/disk/by-uuid/7DFD-854D";
fsType = "vfat";
};
- swapDevices = [ ];
+ swapDevices =
+ [ { device = "/dev/disk/by-uuid/10757668-8f17-4677-b405-f1d1095a81ac"; }
+ ];
+ # 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.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
+ # networking.interfaces.eth0.useDHCP = lib.mkDefault true;
+ # networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
- powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
-
- system.stateVersion = "23.05"; # Did you read the comment?
}
diff --git a/modules/common.nix b/modules/common.nix
index aafc1b0..8ae3b06 100644
--- a/modules/common.nix
+++ b/modules/common.nix
@@ -23,6 +23,21 @@
];
environment.variables.EDITOR = "${pkgs.neovim}/bin/nvim";
+ # Select internationalisation properties.
+ i18n.defaultLocale = "en_US.UTF-8";
+
+ i18n.extraLocaleSettings = {
+ LC_ADDRESS = "en_US.UTF-8";
+ LC_IDENTIFICATION = "en_US.UTF-8";
+ LC_MEASUREMENT = "en_US.UTF-8";
+ LC_MONETARY = "en_US.UTF-8";
+ LC_NAME = "en_US.UTF-8";
+ LC_NUMERIC = "en_US.UTF-8";
+ LC_PAPER = "en_US.UTF-8";
+ LC_TELEPHONE = "en_US.UTF-8";
+ LC_TIME = "en_US.UTF-8";
+ };
+
# nix.settings = {
# keep-outputs = true;
# keep-derivations = true;
@@ -125,4 +140,6 @@
boot.tmp.cleanOnBoot = true;
nixpkgs.config.allowUnfree = true;
+ hardware.enableAllFirmware = true;
+ hardware.enableRedistributableFirmware = true;
}
diff --git a/modules/desktop.nix b/modules/desktop.nix
index 4be9f11..be7af4d 100644
--- a/modules/desktop.nix
+++ b/modules/desktop.nix
@@ -64,6 +64,7 @@ in {
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
+ jack.enable = true;
};
fonts = {
@@ -144,6 +145,7 @@ in {
xss-lock
dunst
transmission-qt
+ qt5.qtwayland
];
# i18n.inputMethod = {