feat: add steamdeck
Some checks failed
/ build-host (map[host:beefcake]) (push) Successful in 58s
/ build-host (map[host:dragon]) (push) Successful in 1m18s
/ build-host (map[host:flipflop]) (push) Successful in 1m9s
/ build-host (map[host:foxtrot]) (push) Successful in 1m17s
/ build-host (map[host:rascal]) (push) Successful in 31s
/ build-host (map[host:router]) (push) Successful in 46s
/ build-devshell (push) Successful in 18s
/ flake-check (push) Failing after 3m48s

This commit is contained in:
Daniel Flanagan 2025-03-20 14:44:12 -05:00
parent bc15d2755f
commit 85652377ba
10 changed files with 293 additions and 100 deletions

234
flake.lock generated
View file

@ -3,9 +3,7 @@
"deploy-rs": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [
"nixpkgs-unstable"
],
"nixpkgs": "nixpkgs",
"utils": "utils"
},
"locked": {
@ -29,11 +27,11 @@
]
},
"locked": {
"lastModified": 1741684000,
"narHash": "sha256-NQykaWIrn5zilncefIvW4jPQ76YMXVK/dMTzkSVDmdk=",
"lastModified": 1741786315,
"narHash": "sha256-VT65AE2syHVj6v/DGB496bqBnu1PXrrzwlw07/Zpllc=",
"owner": "nix-community",
"repo": "disko",
"rev": "2db1d64fc084b1d15e3871dffc02c62a94ed6ed7",
"rev": "0d8c6ad4a43906d14abd5c60e0ffe7b587b213de",
"type": "github"
},
"original": {
@ -147,21 +145,17 @@
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils",
"nixpkgs-stable": [
"nixpkgs"
],
"nixpkgs-unstable": [
"nixpkgs-unstable"
],
"nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-unstable": "nixpkgs-unstable",
"zig": "zig",
"zig2nix": "zig2nix"
"zon2nix": "zon2nix"
},
"locked": {
"lastModified": 1741594465,
"narHash": "sha256-8a/QIgNwV8VGn8JIiACmVVEdue+U3juiMSAO1DEUTC4=",
"lastModified": 1742566887,
"narHash": "sha256-+c18SRtkShaz/oCSNcLkXF8eG7OtfR8M2nTvcOU6Ekk=",
"owner": "ghostty-org",
"repo": "ghostty",
"rev": "95daca616db5c24d7bb37fd5a3ac2f8762bb4ead",
"rev": "4a51643043f720e8949bd7184cc533ddc890a52a",
"type": "github"
},
"original": {
@ -179,11 +173,11 @@
]
},
"locked": {
"lastModified": 1741379162,
"narHash": "sha256-srpAbmJapkaqGRE3ytf3bj4XshspVR5964OX5LfjDWc=",
"lastModified": 1742300892,
"narHash": "sha256-QmF0proyjXI9YyZO9GZmc7/uEu5KVwCtcdLsKSoxPAI=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "b5a62751225b2f62ff3147d0a334055ebadcd5cc",
"rev": "ea26a82dda75bee6783baca6894040c8e6599728",
"type": "github"
},
"original": {
@ -200,7 +194,7 @@
"slippi",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
"lastModified": 1721042469,
@ -261,11 +255,11 @@
},
"hardware": {
"locked": {
"lastModified": 1741325094,
"narHash": "sha256-RUAdT8dZ6k/486vnu3tiNRrNW6+Q8uSD2Mq7gTX4jlo=",
"lastModified": 1742376361,
"narHash": "sha256-VFMgJkp/COvkt5dnkZB4D2szVdmF6DGm5ZdVvTUy61c=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "b48cc4dab0f9711af296fc367b6108cf7b8ccb16",
"rev": "daaae13dff0ecc692509a1332ff9003d9952d7a9",
"type": "github"
},
"original": {
@ -277,17 +271,15 @@
"helix": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nixpkgs-unstable"
],
"nixpkgs": "nixpkgs_2",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1741724933,
"narHash": "sha256-o1LCu4YYruUQc6yd8wwbQ/DyrTCoAD4lDfujykLn9NU=",
"lastModified": 1742566224,
"narHash": "sha256-8uZamLPJdJV+JodhLwLtEpHkB44eBXv0h3/gpoRCPKg=",
"owner": "helix-editor",
"repo": "helix",
"rev": "8df58b2e1779dcf0046fb51ae1893c1eebf01e7c",
"rev": "1c9a5bd366720bcec96b5f98747112355df0bdea",
"type": "github"
},
"original": {
@ -304,11 +296,11 @@
]
},
"locked": {
"lastModified": 1739757849,
"narHash": "sha256-Gs076ot1YuAAsYVcyidLKUMIc4ooOaRGO0PqTY7sBzA=",
"lastModified": 1742234739,
"narHash": "sha256-zFL6zsf/5OztR1NSNQF33dvS1fL/BzVUjabZq4qrtY4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "9d3d080aec2a35e05a15cedd281c2384767c2cfe",
"rev": "f6af7280a3390e65c2ad8fd059cdc303426cbd59",
"type": "github"
},
"original": {
@ -325,11 +317,11 @@
]
},
"locked": {
"lastModified": 1741701235,
"narHash": "sha256-gBlb8R9gnjUAT5XabJeel3C2iEUiBHx3+91651y3Sqo=",
"lastModified": 1742530487,
"narHash": "sha256-yjBjRn294NpPagPAQCio20X5BzBXiOoz2+xF3/YmEkU=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c630dfa8abcc65984cc1e47fb25d4552c81dd37e",
"rev": "d61711497be9ad6a6633aaf203b038b5a970621f",
"type": "github"
},
"original": {
@ -338,39 +330,81 @@
"type": "github"
}
},
"mobile-nixos": {
"flake": false,
"jovian": {
"inputs": {
"nix-github-actions": "nix-github-actions",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1728423157,
"narHash": "sha256-pJaC+Aef6oixhV6HdWPS2Pq/TgHxEN+MPLYUjighWYI=",
"owner": "lytedev",
"repo": "mobile-nixos",
"rev": "b2c496bbcebc85a28d1d939b56bd331536bd1ac4",
"lastModified": 1742465245,
"narHash": "sha256-gpjtkoeq5Ye9J8GoR+rWg3NL4bbEtcLvvF4nN6MtxdU=",
"owner": "Jovian-Experiments",
"repo": "Jovian-NixOS",
"rev": "a95606cae5c9e1f5b84debe7865ef171d4deb287",
"type": "github"
},
"original": {
"owner": "lytedev",
"repo": "mobile-nixos",
"owner": "Jovian-Experiments",
"ref": "development",
"repo": "Jovian-NixOS",
"type": "github"
}
},
"nix-github-actions": {
"inputs": {
"nixpkgs": [
"jovian",
"nixpkgs"
]
},
"locked": {
"lastModified": 1729697500,
"narHash": "sha256-VFTWrbzDlZyFHHb1AlKRiD/qqCJIripXKiCSFS8fAOY=",
"owner": "zhaofengli",
"repo": "nix-github-actions",
"rev": "e418aeb728b6aa5ca8c5c71974e7159c2df1d8cf",
"type": "github"
},
"original": {
"owner": "zhaofengli",
"ref": "matrix-name",
"repo": "nix-github-actions",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1741600792,
"narHash": "sha256-yfDy6chHcM7pXpMF4wycuuV+ILSTG486Z/vLx/Bdi6Y=",
"lastModified": 1702272962,
"narHash": "sha256-D+zHwkwPc6oYQ4G3A1HuadopqRwUY/JkMwHz1YF7j4Q=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ebe2788eafd539477f83775ef93c3c7e244421d3",
"rev": "e97b3e4186bcadf0ef1b6be22b8558eab1cdeb5d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1741992157,
"narHash": "sha256-nlIfTsTrMSksEJc1f7YexXiPVuzD1gOfeN1ggwZyUoc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "da4b122f63095ca1199bd4d526f9e26426697689",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "release-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1720386169,
"narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=",
@ -388,11 +422,27 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1741708242,
"narHash": "sha256-cNRqdQD4sZpN7JLqxVOze4+WsWTmv2DGH0wNCOVwrWc=",
"lastModified": 1741865919,
"narHash": "sha256-4thdbnP6dlbdq+qZWTsm4ffAwoS8Tiq1YResB+RP6WE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "573c650e8a14b2faa0041645ab18aed7e60f0c9a",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable_2": {
"locked": {
"lastModified": 1742456341,
"narHash": "sha256-yvdnTnROddjHxoQqrakUQWDZSzVchczfsuuMOxg476c=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b62d2a95c72fb068aecd374a7262b37ed92df82b",
"rev": "7344a3b78128f7b1765dba89060b015fb75431a7",
"type": "github"
},
"original": {
@ -402,6 +452,54 @@
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1740560979,
"narHash": "sha256-Vr3Qi346M+8CjedtbyUevIGDZW8LcA1fTG0ugPY/Hic=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5135c59491985879812717f4c9fea69604e7f26f",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1742422364,
"narHash": "sha256-mNqIplmEohk5jRkqYqG19GA8MbQ/D4gQSK0Mu4LvfRQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a84ebe20c6bc2ecbcfb000a50776219f48d134cc",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1742512142,
"narHash": "sha256-8XfURTDxOm6+33swQJu/hx6xw1Tznl8vJJN5HwVqckg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7105ae3957700a9646cc4b766f5815b23ed0c682",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"deploy-rs": "deploy-rs",
@ -412,9 +510,9 @@
"helix": "helix",
"home-manager": "home-manager",
"home-manager-unstable": "home-manager-unstable",
"mobile-nixos": "mobile-nixos",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"jovian": "jovian",
"nixpkgs": "nixpkgs_4",
"nixpkgs-unstable": "nixpkgs-unstable_2",
"slippi": "slippi",
"sops-nix": "sops-nix"
}
@ -471,11 +569,11 @@
]
},
"locked": {
"lastModified": 1741644481,
"narHash": "sha256-E0RrMykMtEv15V3QhpsFutgoSKhL1JBhidn+iZajOyg=",
"lastModified": 1742406979,
"narHash": "sha256-r0aq70/3bmfjTP+JZs4+XV5SgmCtk1BLU4CQPWGtA7o=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "e653d71e82575a43fe9d228def8eddb73887b866",
"rev": "1770be8ad89e41f1ed5a60ce628dd10877cb3609",
"type": "github"
},
"original": {
@ -562,11 +660,11 @@
]
},
"locked": {
"lastModified": 1738239110,
"narHash": "sha256-Y5i9mQ++dyIQr+zEPNy+KIbc5wjPmfllBrag3cHZgcE=",
"lastModified": 1741825901,
"narHash": "sha256-aeopo+aXg5I2IksOPFN79usw7AeimH1+tjfuMzJHFdk=",
"owner": "mitchellh",
"repo": "zig-overlay",
"rev": "1a8fb6f3a04724519436355564b95fce5e272504",
"rev": "0b14285e283f5a747f372fb2931835dd937c4383",
"type": "github"
},
"original": {
@ -575,7 +673,7 @@
"type": "github"
}
},
"zig2nix": {
"zon2nix": {
"inputs": {
"flake-utils": [
"ghostty",
@ -583,21 +681,21 @@
],
"nixpkgs": [
"ghostty",
"nixpkgs-stable"
"nixpkgs-unstable"
]
},
"locked": {
"lastModified": 1741368279,
"narHash": "sha256-WTaC8HmnIq6O71iK0g9as404BbmS+YyEP5qS85m2JBY=",
"lastModified": 1742104771,
"narHash": "sha256-LhidlyEA9MP8jGe1rEnyjGFCzLLgCdDpYeWggibayr0=",
"owner": "jcollie",
"repo": "zig2nix",
"rev": "672971b5b6911de21446ad4fc76dee677922eda0",
"repo": "zon2nix",
"rev": "56c159be489cc6c0e73c3930bd908ddc6fe89613",
"type": "github"
},
"original": {
"owner": "jcollie",
"ref": "672971b5b6911de21446ad4fc76dee677922eda0",
"repo": "zig2nix",
"ref": "56c159be489cc6c0e73c3930bd908ddc6fe89613",
"repo": "zon2nix",
"type": "github"
}
}

View file

@ -48,9 +48,14 @@
home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# "unstable" inputs
# unstable inputs
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
home-manager-unstable.url = "github:nix-community/home-manager";
home-manager-unstable.inputs.nixpkgs.follows = "nixpkgs-unstable";
hardware.url = "github:NixOS/nixos-hardware";
disko.url = "github:nix-community/disko/master";
disko.inputs.nixpkgs.follows = "nixpkgs";
@ -60,33 +65,26 @@
git-hooks.url = "github:cachix/git-hooks.nix";
git-hooks.inputs.nixpkgs.follows = "nixpkgs-unstable";
home-manager-unstable.url = "github:nix-community/home-manager";
home-manager-unstable.inputs.nixpkgs.follows = "nixpkgs-unstable";
helix.url = "github:helix-editor/helix/master";
helix.inputs.nixpkgs.follows = "nixpkgs-unstable";
slippi.url = "github:lytedev/slippi-nix";
# slippi.url = "git+file:///home/daniel/code/open-source/slippi-nix"; # used during flake development
slippi.inputs.nixpkgs.follows = "nixpkgs-unstable";
slippi.inputs.home-manager.follows = "home-manager-unstable";
# jovian.url = "github:Jovian-Experiments/Jovian-NixOS/development";
# inputs with their own cache I want to use
helix.url = "github:helix-editor/helix/master";
# helix.inputs.nixpkgs.follows = "nixpkgs-unstable";
jovian.url = "github:Jovian-Experiments/Jovian-NixOS/development";
# jovian.inputs.nixpkgs.follows = "nixpkgs-unstable";
ghostty.url = "github:ghostty-org/ghostty";
ghostty.inputs.nixpkgs-unstable.follows = "nixpkgs-unstable";
ghostty.inputs.nixpkgs-stable.follows = "nixpkgs";
# ghostty.inputs.nixpkgs-unstable.follows = "nixpkgs-unstable";
# ghostty.inputs.nixpkgs-stable.follows = "nixpkgs";
deploy-rs.url = "github:serokell/deploy-rs";
deploy-rs.inputs.nixpkgs.follows = "nixpkgs-unstable";
# deploy-rs.inputs.nixpkgs.follows = "nixpkgs-unstable";
# nnf.url = "github:thelegy/nixos-nftables-firewall?rev=71fc2b79358d0dbacde83c806a0f008ece567b7b";
mobile-nixos = {
url = "github:lytedev/mobile-nixos";
flake = false;
};
# nnf.url = "github:thelegy/nixos-nftables-firewall";
};
nixConfig = {
@ -100,9 +98,8 @@
"https://nix-community.cachix.org"
"https://nix.h.lyte.dev"
# since we are forcing most inputs to follow our nixpkgs, we don't bother settings up caches and just use our own
# "https://helix.cachix.org"
# "https://ghostty.cachix.org"
"https://helix.cachix.org"
"https://ghostty.cachix.org"
];
extra-trusted-public-keys = [
@ -110,9 +107,8 @@
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"h.lyte.dev-2:te9xK/GcWPA/5aXav8+e5RHImKYMug8hIIbhHsKPN0M="
# "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
# "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
# "ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns="
"helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
"ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns="
];
};
}

View file

@ -25,5 +25,5 @@ rec {
else
relPath;
inherit (import ./host.nix inputs) host stableHost;
inherit (import ./host.nix inputs) host stableHost steamdeckHost;
}

View file

@ -1,5 +1,19 @@
{ deploy-rs, self, ... }:
let
deployPkgs =
system:
import self.inputs.nixpkgs {
inherit system;
overlays = [
deploy-rs.overlays.default
(final: prev: {
deploy-rs = {
inherit (prev) deploy-rs;
lib = deploy-rs.lib;
};
})
];
};
deployer =
host: opts:
{
@ -9,7 +23,9 @@ let
interactiveSudo = true;
profiles.system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.${host};
path =
(deployPkgs self.nixosConfigurations.${host}.pkgs.system).deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.${host};
};
}
// opts;

View file

@ -4,6 +4,8 @@ let
{
nixpkgs,
home-manager,
extraModules ? [ ],
extraOverlays ? [ ],
...
}:
(
@ -19,10 +21,17 @@ let
hardware = inputs.hardware.outputs.nixosModules;
diskoConfigurations = inputs.self.outputs.diskoConfigurations;
};
modules = [
inputs.self.outputs.nixosModules.default
(import path)
];
modules =
[
{
nixpkgs.overlays = extraOverlays;
}
]
++ extraModules
++ [
inputs.self.outputs.nixosModules.default
(import path)
];
})
)
);
@ -33,4 +42,10 @@ in
nixpkgs = inputs.nixpkgs-unstable;
home-manager = inputs.home-manager-unstable;
};
steamdeckHost = baseHost {
nixpkgs = inputs.nixpkgs-unstable;
home-manager = inputs.home-manager-unstable;
extraModules = [ inputs.jovian.outputs.nixosModules.default ];
# do NOT manually include the jovian overlay here
};
}

View file

@ -119,11 +119,17 @@
"https://cache.nixos.org/"
"https://nix-community.cachix.org"
"https://nix.h.lyte.dev"
"https://helix.cachix.org"
"https://ghostty.cachix.org"
];
extra-trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"h.lyte.dev-2:te9xK/GcWPA/5aXav8+e5RHImKYMug8hIIbhHsKPN0M="
"helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
"ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns="
];
};
};

View file

@ -1,6 +1,6 @@
inputs:
let
inherit (inputs.self.flakeLib) host stableHost;
inherit (inputs.self.flakeLib) host stableHost steamdeckHost;
in
{
beefcake = stableHost ./beefcake.nix { };
@ -13,6 +13,9 @@ in
rascal = stableHost ./rascal.nix { };
flipflop = host ./flipflop.nix { };
steamdeck = steamdeckHost ./steamdeck.nix { };
steamdeckoled = steamdeckHost ./steamdeckoled.nix { };
generic-headless = stableHost ./generic-headless.nix { };
generic = stableHost ./generic.nix { };

View file

@ -59,8 +59,8 @@
enable = true;
learn-jujutsu-not-git.enable = true;
};
desktop.enable = true;
};
lyte.desktop.enable = true;
slippi-launcher = {
enable = true;
isoPath = "${config.users.users.daniel.home}/../games/roms/dolphin/melee.iso";

View file

@ -0,0 +1,58 @@
{
diskoConfigurations,
# hardware, # do NOT use nixos-hardware with jovian config
...
}:
{
system.stateVersion = "24.11";
networking = {
hostName = "dragon";
wifi.enable = true;
};
hardware.bluetooth.enable = true;
boot = {
# kernelPackages = pkgs.linuxPackages_latest; # do NOT use with jovian config
loader = {
efi.canTouchEfiVariables = true;
systemd-boot.enable = true;
};
};
imports = [
(diskoConfigurations.unencrypted { disk = "/dev/nvme0n1"; })
];
lyte.desktop.enable = true;
home-manager.users.daniel = {
lyte = {
useOutOfStoreSymlinks.enable = true;
shell = {
enable = true;
learn-jujutsu-not-git.enable = true;
};
desktop.enable = true;
};
};
programs.steam.enable = true;
jovian = {
decky-loader = {
enable = true;
};
steam = {
autoStart = true;
updater = {
splash = "jovian";
};
};
hardware = {
has.amd.gpu = true;
};
devices = {
steamdeck = {
enable = true;
autoUpdate = true;
# enableGyroDsuService = true;
};
};
};
}

View file

@ -119,7 +119,8 @@ buildNpmPackage rec {
runHook preBuild
# pipe to cat to disable progress bar
npm run build --no-update-notifier --targets ttf::$pname -- --jCmd=$NIX_BUILD_CORES --verbosity=9 | cat
# force use of only two cores here to avoid oomkilling most machines
npm run build --no-update-notifier --targets ttf::$pname -- --jCmd=2 --verbosity=9 | cat
runHook postBuild
'';