feat: add nswitch-rcm-nix

This commit is contained in:
Swarsel 2024-07-18 14:57:04 +02:00
parent ba95edeb8c
commit add59c36bf
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
6 changed files with 174 additions and 54 deletions

View file

@ -394,6 +394,7 @@ Mind the comma at the end. You need this because the =...= is being passed as th
nix-gaming, nix-gaming,
nixos-hardware, nixos-hardware,
nix-alien, nix-alien,
nswitch-rcm-nix,
#+end_src #+end_src
@ -428,65 +429,70 @@ A short overview over each input and what it does:
#+begin_src nix :tangle no :noweb-ref flakeinputs #+begin_src nix :tangle no :noweb-ref flakeinputs
nixpkgs.url = github:nixos/nixpkgs/nixos-unstable; nixpkgs.url = github:nixos/nixpkgs/nixos-unstable;
nixpkgs-stable.url = github:NixOS/nixpkgs/nixos-24.05; nixpkgs-stable.url = github:NixOS/nixpkgs/nixos-24.05;
# user-level configuration # user-level configuration
home-manager = { home-manager = {
url = github:nix-community/home-manager; url = github:nix-community/home-manager;
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# overlay to access bleeding edge emacs # overlay to access bleeding edge emacs
emacs-overlay = { emacs-overlay = {
url = github:nix-community/emacs-overlay; url = github:nix-community/emacs-overlay;
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# nix user repository # nix user repository
# i use this mainly to not have to build all firefox extensions # i use this mainly to not have to build all firefox extensions
# myself as well as for the emacs-init package (tbd) # myself as well as for the emacs-init package (tbd)
nur.url = github:nix-community/NUR; nur.url = github:nix-community/NUR;
# provides GL to non-NixOS hosts # provides GL to non-NixOS hosts
nixgl.url = github:guibou/nixGL; nixgl.url = github:guibou/nixGL;
# manages all theming using Home-Manager # manages all theming using Home-Manager
stylix.url = github:danth/stylix; stylix.url = github:danth/stylix;
# nix secrets management # nix secrets management
sops-nix.url = github:Mic92/sops-nix; sops-nix.url = github:Mic92/sops-nix;
# enable secure boot on NixOS # enable secure boot on NixOS
lanzaboote.url = github:nix-community/lanzaboote; lanzaboote.url = github:nix-community/lanzaboote;
# nix for android # nix for android
nix-on-droid = { nix-on-droid = {
url = github:t184256/nix-on-droid/release-23.05; url = github:t184256/nix-on-droid/release-23.05;
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# generate NixOS images # generate NixOS images
nixos-generators = { nixos-generators = {
url = github:nix-community/nixos-generators; url = github:nix-community/nixos-generators;
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# patches for gaming on nix # patches for gaming on nix
nix-gaming = { nix-gaming = {
url = github:fufexan/nix-gaming; url = github:fufexan/nix-gaming;
}; };
# hardware quirks on nix # hardware quirks on nix
nixos-hardware = { nixos-hardware = {
url = github:NixOS/nixos-hardware/master; url = github:NixOS/nixos-hardware/master;
}; };
# dynamic library loading # dynamic library loading
nix-alien = { nix-alien = {
url = github:thiagokokada/nix-alien; url = github:thiagokokada/nix-alien;
}; };
# automatic nintendo switch payload injection
nswitch-rcm-nix = {
url = github:Swarsel/nswitch-rcm-nix;
};
#+end_src #+end_src
*** let *** let
@ -529,6 +535,7 @@ Lastly I define some common module lists that I can simply load depending on the
# NixOS modules that can only be used on NixOS systems # NixOS modules that can only be used on NixOS systems
nixModules = [ stylix.nixosModules.stylix nixModules = [ stylix.nixosModules.stylix
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
nswitch-rcm-nix.nixosModules.nswitch-rcm
./profiles/common/nixos.nix ./profiles/common/nixos.nix
# dynamic library loading # dynamic library loading
({ self, system, ... }: { ({ self, system, ... }: {
@ -2109,6 +2116,14 @@ Mostly just sets some opened ports for several games, enables virtualbox (which
services.power-profiles-daemon.enable = true; services.power-profiles-daemon.enable = true;
services.fprintd.enable = true; services.fprintd.enable = true;
services.nswitch-rcm = {
enable = true;
package = (pkgs.fetchurl {
url = "https://github.com/Atmosphere-NX/Atmosphere/releases/download/1.3.2/fusee.bin";
hash = "sha256-5AXzNsny45SPLIrvWJA9/JlOCal5l6Y++Cm+RtlJppI=";
});
};
users.users.swarsel = { users.users.swarsel = {
isNormalUser = true; isNormalUser = true;
description = "Leon S"; description = "Leon S";
@ -5299,6 +5314,7 @@ Programming languages and default lsp's are defined here: [[#h:0e7e8bea-ec58-499
gamescope gamescope
vulkan-tools vulkan-tools
moonlight-qt moonlight-qt
ns-usbloader
# firefox related # firefox related
tridactyl-native tridactyl-native

71
flake.lock generated
View file

@ -243,6 +243,23 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": {
"lastModified": 1719994518,
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
"type": "github"
},
"original": {
"id": "flake-parts",
"type": "indirect"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -695,6 +712,18 @@
"url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz" "url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz"
} }
}, },
"nixpkgs-lib_2": {
"locked": {
"lastModified": 1719876945,
"narHash": "sha256-Fm2rDDs86sHy0/1jxTOKB1118Q0O3Uc7EC0iXvXKpbI=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz"
}
},
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1720954236, "lastModified": 1720954236,
@ -823,6 +852,22 @@
} }
}, },
"nixpkgs_6": { "nixpkgs_6": {
"locked": {
"lastModified": 1720957393,
"narHash": "sha256-oedh2RwpjEa+TNxhg5Je9Ch6d3W1NKi7DbRO1ziHemA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "693bc46d169f5af9c992095736e82c3488bf7dbb",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1720781449, "lastModified": 1720781449,
"narHash": "sha256-po3TZO9kcZwzvkyMJKb0WCzzDtiHWD34XeRaX1lWXp0=", "narHash": "sha256-po3TZO9kcZwzvkyMJKb0WCzzDtiHWD34XeRaX1lWXp0=",
@ -838,7 +883,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_7": { "nixpkgs_8": {
"locked": { "locked": {
"lastModified": 1714912032, "lastModified": 1714912032,
"narHash": "sha256-clkcOIkg8G4xuJh+1onLG4HPMpbtzdLv4rHxFzgsH9c=", "narHash": "sha256-clkcOIkg8G4xuJh+1onLG4HPMpbtzdLv4rHxFzgsH9c=",
@ -902,6 +947,25 @@
"type": "gitlab" "type": "gitlab"
} }
}, },
"nswitch-rcm-nix": {
"inputs": {
"flake-parts": "flake-parts_3",
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1721302286,
"narHash": "sha256-U/6iULCDW7YskAQVU+bFE16R3wXMceBB2Jj+9bE3K0c=",
"owner": "Swarsel",
"repo": "nswitch-rcm-nix",
"rev": "f14feb140e057770ce58d20b756c8ac2fb172398",
"type": "github"
},
"original": {
"owner": "Swarsel",
"repo": "nswitch-rcm-nix",
"type": "github"
}
},
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1721205995, "lastModified": 1721205995,
@ -957,6 +1021,7 @@
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_5",
"nixpkgs-stable": "nixpkgs-stable_3", "nixpkgs-stable": "nixpkgs-stable_3",
"nswitch-rcm-nix": "nswitch-rcm-nix",
"nur": "nur", "nur": "nur",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"stylix": "stylix" "stylix": "stylix"
@ -989,7 +1054,7 @@
}, },
"sops-nix": { "sops-nix": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_6", "nixpkgs": "nixpkgs_7",
"nixpkgs-stable": "nixpkgs-stable_4" "nixpkgs-stable": "nixpkgs-stable_4"
}, },
"locked": { "locked": {
@ -1018,7 +1083,7 @@
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_3",
"gnome-shell": "gnome-shell", "gnome-shell": "gnome-shell",
"home-manager": "home-manager_3", "home-manager": "home-manager_3",
"nixpkgs": "nixpkgs_7" "nixpkgs": "nixpkgs_8"
}, },
"locked": { "locked": {
"lastModified": 1720818679, "lastModified": 1720818679,

View file

@ -63,6 +63,11 @@
url = github:thiagokokada/nix-alien; url = github:thiagokokada/nix-alien;
}; };
# automatic nintendo switch payload injection
nswitch-rcm-nix = {
url = github:Swarsel/nswitch-rcm-nix;
};
}; };
outputs = inputs@{ outputs = inputs@{
@ -82,6 +87,7 @@
nix-gaming, nix-gaming,
nixos-hardware, nixos-hardware,
nix-alien, nix-alien,
nswitch-rcm-nix,
... ...
}: let }: let
@ -113,6 +119,7 @@
# NixOS modules that can only be used on NixOS systems # NixOS modules that can only be used on NixOS systems
nixModules = [ stylix.nixosModules.stylix nixModules = [ stylix.nixosModules.stylix
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
nswitch-rcm-nix.nixosModules.nswitch-rcm
./profiles/common/nixos.nix ./profiles/common/nixos.nix
# dynamic library loading # dynamic library loading
({ self, system, ... }: { ({ self, system, ... }: {

View file

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head> <head>
<!-- 2024-07-17 Mi 12:44 --> <!-- 2024-07-18 Do 14:56 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>SwarselSystems: NixOS + Emacs Configuration</title> <title>SwarselSystems: NixOS + Emacs Configuration</title>
@ -387,7 +387,7 @@
</div> </div>
</div> </div>
<p> <p>
<b>This file has 42346 words spanning 11029 lines and was last revised on 2024-07-17 12:44:13 +0200.</b> <b>This file has 42399 words spanning 11045 lines and was last revised on 2024-07-18 14:56:09 +0200.</b>
</p> </p>
<p> <p>
@ -437,7 +437,7 @@ This section defines my Emacs configuration. For a while, I considered to use ry
</p> </p>
<p> <p>
My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2024-07-17 12:44:13 +0200) My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2024-07-18 14:56:09 +0200)
</p></li> </p></li>
</ul> </ul>
@ -449,7 +449,7 @@ system-configuration-options
</div> </div>
<pre class="example"> <pre class="example">
--prefix=/nix/store/y5vn4lfxjh26r0pglhq102zg6gzx1hwm-emacs-pgtk-20240711.0 --disable-build-details --with-modules --with-pgtk --with-compress-install --with-toolkit-scroll-bars --with-native-compilation --without-imagemagick --with-mailutils --without-small-ja-dic --with-tree-sitter --without-xinput2 --with-xwidgets --with-dbus --with-selinux --prefix=/nix/store/6y05k2rmg7xfinnaglr0js84qi0cl7lv-emacs-pgtk-20240717.0 --disable-build-details --with-modules --with-pgtk --with-compress-install --with-toolkit-scroll-bars --with-native-compilation --without-imagemagick --with-mailutils --without-small-ja-dic --with-tree-sitter --without-xinput2 --with-xwidgets --with-dbus --with-selinux
</pre> </pre>
@ -880,6 +880,7 @@ lanzaboote,
nix-gaming, nix-gaming,
nixos-hardware, nixos-hardware,
nix-alien, nix-alien,
nswitch-rcm-nix,
</pre> </pre>
</div> </div>
@ -979,6 +980,11 @@ nix-alien = {
url = github:thiagokokada/nix-alien; url = github:thiagokokada/nix-alien;
}; };
# automatic nintendo switch payload injection
nswitch-rcm-nix = {
url = github:Swarsel/nswitch-rcm-nix;
};
</pre> </pre>
</div> </div>
</div> </div>
@ -1027,6 +1033,7 @@ armpkgs = import nixpkgs { system = "aarch64-linux";
# NixOS modules that can only be used on NixOS systems # NixOS modules that can only be used on NixOS systems
nixModules = [ stylix.nixosModules.stylix nixModules = [ stylix.nixosModules.stylix
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
nswitch-rcm-nix.nixosModules.nswitch-rcm
./profiles/common/nixos.nix ./profiles/common/nixos.nix
# dynamic library loading # dynamic library loading
({ self, system, ... }: { ({ self, system, ... }: {
@ -2890,6 +2897,14 @@ Mostly just sets some opened ports for several games, enables virtualbox (which
services.power-profiles-daemon.enable = true; services.power-profiles-daemon.enable = true;
services.fprintd.enable = true; services.fprintd.enable = true;
services.nswitch-rcm = {
enable = true;
package = (pkgs.fetchurl {
url = "https://github.com/Atmosphere-NX/Atmosphere/releases/download/1.3.2/fusee.bin";
hash = "sha256-5AXzNsny45SPLIrvWJA9/JlOCal5l6Y++Cm+RtlJppI=";
});
};
users.users.swarsel = { users.users.swarsel = {
isNormalUser = true; isNormalUser = true;
description = "Leon S"; description = "Leon S";
@ -6446,6 +6461,7 @@ Programming languages and default lsp's are defined here: <a href="#h:0e7e8bea-e
gamescope gamescope
vulkan-tools vulkan-tools
moonlight-qt moonlight-qt
ns-usbloader
# firefox related # firefox related
tridactyl-native tridactyl-native
@ -8485,6 +8501,11 @@ This tangles the flake.nix file; This block only needs to be touched when updati
url = github:thiagokokada/nix-alien; url = github:thiagokokada/nix-alien;
}; };
# automatic nintendo switch payload injection
nswitch-rcm-nix = {
url = github:Swarsel/nswitch-rcm-nix;
};
}; };
outputs = inputs@{ outputs = inputs@{
@ -8504,6 +8525,7 @@ This tangles the flake.nix file; This block only needs to be touched when updati
nix-gaming, nix-gaming,
nixos-hardware, nixos-hardware,
nix-alien, nix-alien,
nswitch-rcm-nix,
... ...
}: let }: let
@ -8535,6 +8557,7 @@ This tangles the flake.nix file; This block only needs to be touched when updati
# NixOS modules that can only be used on NixOS systems # NixOS modules that can only be used on NixOS systems
nixModules = [ stylix.nixosModules.stylix nixModules = [ stylix.nixosModules.stylix
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
nswitch-rcm-nix.nixosModules.nswitch-rcm
./profiles/common/nixos.nix ./profiles/common/nixos.nix
# dynamic library loading # dynamic library loading
({ self, system, ... }: { ({ self, system, ... }: {
@ -12968,7 +12991,7 @@ My laptop, sadly soon to be replaced by a new one, since most basic functions ar
</div> </div>
<div id="postamble" class="status"> <div id="postamble" class="status">
<p class="author">Author: Leon Schwarzäugl</p> <p class="author">Author: Leon Schwarzäugl</p>
<p class="date">Created: 2024-07-17 Mi 12:44</p> <p class="date">Created: 2024-07-18 Do 14:56</p>
<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p> <p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
</div> </div>
</body> </body>

View file

@ -66,6 +66,7 @@
gamescope gamescope
vulkan-tools vulkan-tools
moonlight-qt moonlight-qt
ns-usbloader
# firefox related # firefox related
tridactyl-native tridactyl-native

View file

@ -140,6 +140,14 @@
services.power-profiles-daemon.enable = true; services.power-profiles-daemon.enable = true;
services.fprintd.enable = true; services.fprintd.enable = true;
services.nswitch-rcm = {
enable = true;
package = (pkgs.fetchurl {
url = "https://github.com/Atmosphere-NX/Atmosphere/releases/download/1.3.2/fusee.bin";
hash = "sha256-5AXzNsny45SPLIrvWJA9/JlOCal5l6Y++Cm+RtlJppI=";
});
};
users.users.swarsel = { users.users.swarsel = {
isNormalUser = true; isNormalUser = true;
description = "Leon S"; description = "Leon S";