I think my flake needs a complete rewrite

This commit is contained in:
Jimbo 2024-10-12 17:35:52 -04:00
parent 87fbcda3d3
commit 65f90a0bf3
65 changed files with 110 additions and 125 deletions

View file

@ -333,22 +333,6 @@
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1727348695,
"narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1717602782,
@ -447,8 +431,8 @@
"mailserver": "mailserver",
"minecraft": "minecraft",
"nixpkgs": "nixpkgs_4",
"nixpkgs-unstable": "nixpkgs-unstable",
"nur": "nur"
"nur": "nur",
"unstable": "unstable"
}
},
"rust-overlay": {
@ -521,6 +505,22 @@
"type": "github"
}
},
"unstable": {
"locked": {
"lastModified": 1728492678,
"narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems_2"

105
flake.nix
View file

@ -1,6 +1,5 @@
{
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nur.url = "github:nix-community/NUR";
@ -29,6 +28,7 @@
nur,
mailserver,
blender-bin,
minecraft,
hardware,
lanzaboote,
home-manager,
@ -36,7 +36,7 @@
} @inputs:
let
channels = {
master = import nixpkgs {
stable = import nixpkgs {
inherit (flake) system overlays;
config.allowUnfree = true;
};
@ -51,93 +51,82 @@
(import ./overlays/mpv { inherit (self) inputs channels; })
];
packages = import ./packages/default.nix { inherit (nix) pkgs; };
};
nix = rec {
pkgs = channels.stable // flake.packages;
inherit (pkgs) lib;
inherit (flake) channels-config;
};
mkNixos = modules: nixpkgs.lib.nixosSystem {
inherit (nix) pkgs;
system = "x86_64-linux";
specialArgs = {
inherit
inputs
;
};
};
mkHome = modules: pkgs: home-manager.lib.homeManagerConfiguration {
inherit (nix) pkgs;
};
in {
# Variables defined globally
secrets = import ./extras/secrets.nix;
cmd = import ./extras/cmd.nix;
displays = import ./extras/displays.nix;
ips = import ./extras/ips.nix;
look = import ./extras/look.nix;
ws = import ./extras/workspaces.nix;
};
nix = rec {
pkgs = channels.master // flake.packages;
inherit (pkgs) lib;
inherit (flake) channels-config;
};
in {
# NixOS config entrypoint, use 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
JimDesktop = nixpkgs.lib.nixosSystem {
inherit (nix) pkgs;
specialArgs = { inherit inputs outputs; };
modules = [
./system/hosts/JimDesktop/configuration.nix
firefly = mkNixos [
./modules/system/hardware/firefly
./modules/system
./modules/system/desktop
./modules/system/devices
./modules/system/programs
./modules/system/services/ssh
./modules/system/services/sunshine
./modules/system/services/networkfs
./modules/system/services/virtualization
lanzaboote.nixosModules.lanzaboote
];
};
JimServer = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs; };
modules = [
JimServer = mkNixos [
./system/hosts/JimServer/configuration.nix
mailserver.nixosModule
];
};
JimPine = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs; };
modules = [
JimPine = mkNixos [
./system/hosts/JimPine/configuration.nix
hardware.nixosModules.pine64-pinebook-pro
];
};
JimLenovo = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs; };
modules = [
./system/hosts/JimLenovo/configuration.nix
];
};
};
# Home-manager configuration, use 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
"jimbo@JimDesktop" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
modules = [
./home/hosts/JimDesktop/home.nix
"jimbo@JimDesktop" = mkHome [
./modules/home
./modules/home/files
./modules/home/programs
./modules/home/settings
./modules/home/sway
./modules/home/utils
nur.nixosModules.nur
];
};
"jimbo@JimServer" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
modules = [
"jimbo@JimServer" = mkHome [
./home/hosts/JimServer/home.nix
];
};
"jimbo@JimPine" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.aarch64-linux;
extraSpecialArgs = { inherit inputs outputs; };
modules = [
"jimbo@JimPine" = mkHome [
./home/hosts/JimPine/home.nix
nur.nixosModules.nur
];
};
"jimbo@JimLenovo" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
modules = [
./home/hosts/JimLenovo/home.nix
nur.nixosModules.nur
];
};
# Derivation for ssh envrionments on other people's servers
"jimbo@JimTerminal" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
modules = [
"jimbo@JimTerminal" = mkHome [
./home/hosts/JimTerminal/home.nix
];
};
};
};
}

View file

@ -2,6 +2,7 @@
{
imports = [
./dconf
./fonts
./gtk
./xdg
];

View file

@ -0,0 +1,19 @@
{ pkgs, ... }: {
home.packages = with pkgs; [
liberation_ttf
twitter-color-emoji
noto-fonts
sarasa-gothic
ubuntu_font_family
(nerdfonts.override { fonts = [ "UbuntuMono" ]; })
];
fonts.fontconfig = {
enable = true;
defaultFonts = {
sansSerif = [ "Ubuntu" ];
monospace = [ "UbuntuMono Nerd Font Mono" ];
emoji = [ "Twitter Color Emoji" ];
};
};
}

View file

@ -31,5 +31,10 @@
info.enable = false;
};
console = {
font = "${pkgs.terminus_font}/share/consolefonts/ter-u22n.psf.gz";
packages = with pkgs; [ terminus_font ];
};
hardware.enableRedistributableFirmware = true;
}

View file

@ -4,5 +4,6 @@
./qt
./wayland
./sway
./fonts
];
}

View file

@ -1,24 +0,0 @@
{ pkgs, ... }: {
fonts = {
packages = with pkgs; [
liberation_ttf
twitter-color-emoji
noto-fonts
sarasa-gothic
ubuntu_font_family
(nerdfonts.override {
fonts = [
"UbuntuMono"
];
})
];
fontconfig.defaultFonts.emoji = [
"Twitter Color Emoji"
];
};
console = {
font = "${pkgs.terminus_font}/share/consolefonts/ter-u22n.psf.gz";
packages = with pkgs; [ terminus_font ];
};
}

View file

@ -1,6 +0,0 @@
{ ... }:
{
imports = [
./qemu
];
}

View file

@ -1,5 +1,5 @@
{ ... }:
self: super: {
(self: super: {
mpv = super.mpv.override {
scripts = with self.mpvScripts; [
mpris
@ -7,4 +7,4 @@ self: super: {
thumbnail
];
};
}
})