mirror of
https://github.com/Moe1369/nixos-config.git
synced 2024-10-18 04:14:08 +02:00
This commit is contained in:
parent
4d110c5f62
commit
6c1b973d93
179
flake.nix
179
flake.nix
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
description = "Moe.OS";
|
description = "Moe.OS";
|
||||||
|
|
||||||
# Define Inputs
|
# Define Inputs
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||||
@ -19,93 +20,93 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Define Outputs, import Modules
|
# Define Outputs, import Modules
|
||||||
outputs =
|
outputs = {
|
||||||
{
|
nixpkgs,
|
||||||
nixpkgs,
|
home-manager,
|
||||||
home-manager,
|
jovian,
|
||||||
jovian,
|
plasma-manager,
|
||||||
plasma-manager,
|
nix-flatpak,
|
||||||
nix-flatpak,
|
lanzaboote,
|
||||||
lanzaboote,
|
...
|
||||||
...
|
}:
|
||||||
}:
|
let
|
||||||
let
|
# Define system globally since I have no aarch devices
|
||||||
# Define system globally since I have no aarch devices
|
system = "x86_64-linux";
|
||||||
system = "x86_64-linux";
|
pkgs = import nixpkgs { inherit system; };
|
||||||
pkgs = import nixpkgs { inherit system; };
|
lib = nixpkgs.lib;
|
||||||
lib = nixpkgs.lib;
|
|
||||||
# NixOS Modules for all hosts
|
# NixOS Modules for all hosts
|
||||||
systemModules = [
|
systemModules = [
|
||||||
lanzaboote.nixosModules.lanzaboote
|
lanzaboote.nixosModules.lanzaboote
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
nix-flatpak.nixosModules.nix-flatpak
|
nix-flatpak.nixosModules.nix-flatpak
|
||||||
./modules/system/apps-shell
|
./modules/system/apps-shell
|
||||||
./modules/system/boot
|
./modules/system/boot
|
||||||
./modules/system/devices
|
./modules/system/devices
|
||||||
./modules/system/home-manager
|
./modules/system/home-manager
|
||||||
./modules/system/locale
|
./modules/system/locale
|
||||||
./modules/system/networking
|
./modules/system/networking
|
||||||
./modules/system/nixsettings
|
./modules/system/nixsettings
|
||||||
./modules/system/shell
|
./modules/system/shell
|
||||||
./modules/system/systemversion
|
./modules/system/systemversion
|
||||||
./modules/system/upgrades
|
./modules/system/upgrades
|
||||||
./modules/system/users
|
./modules/system/users
|
||||||
];
|
];
|
||||||
# Home Manager Modules for all hosts
|
|
||||||
userModules = [
|
# Home Manager Modules for all hosts
|
||||||
./modules/user/git
|
userModules = [
|
||||||
./modules/user/homeversion
|
./modules/user/git
|
||||||
./modules/user/shell
|
./modules/user/homeversion
|
||||||
];
|
./modules/user/shell
|
||||||
in
|
];
|
||||||
{
|
in
|
||||||
nixosConfigurations = {
|
{
|
||||||
# Workstation config
|
nixosConfigurations = {
|
||||||
# user and hostName variable inside hostConfig so we can call it in other modules
|
# Workstation config
|
||||||
workstation =
|
workstation =
|
||||||
let
|
let
|
||||||
user = "mo";
|
user = "mo";
|
||||||
hostName = "workstation";
|
hostName = "workstation";
|
||||||
in
|
in
|
||||||
lib.nixosSystem {
|
lib.nixosSystem {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit systemModules;
|
inherit systemModules;
|
||||||
inherit userModules;
|
inherit userModules;
|
||||||
inherit system;
|
inherit system;
|
||||||
inherit user;
|
inherit user;
|
||||||
inherit hostName;
|
inherit hostName;
|
||||||
};
|
|
||||||
system = system;
|
|
||||||
# Device specific NixOS Modules
|
|
||||||
modules = systemModules ++ [
|
|
||||||
jovian.nixosModules.jovian
|
|
||||||
./hosts/${hostName}
|
|
||||||
./modules/system/ai
|
|
||||||
./modules/system/apps-misc
|
|
||||||
./modules/system/browser
|
|
||||||
./modules/system/controller
|
|
||||||
./modules/system/flatpak
|
|
||||||
./modules/system/jovian-${hostName}
|
|
||||||
./modules/system/lact
|
|
||||||
./modules/system/plasma
|
|
||||||
./modules/system/retrodeck
|
|
||||||
./modules/system/steam
|
|
||||||
./modules/system/syncthing
|
|
||||||
./modules/system/sddm
|
|
||||||
{
|
|
||||||
# Device specific Home Manager Modules
|
|
||||||
home-manager.users.${user}.imports = userModules ++ [
|
|
||||||
./modules/user/plasma
|
|
||||||
];
|
|
||||||
# Issue with Plasma Manager, has to be imported in a special way
|
|
||||||
home-manager.sharedModules = [ plasma-manager.homeManagerModules.plasma-manager ];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
system = system;
|
||||||
|
# Device specific NixOS Modules
|
||||||
|
modules = systemModules ++ [
|
||||||
|
jovian.nixosModules.jovian
|
||||||
|
./hosts/${hostName}
|
||||||
|
./modules/system/ai
|
||||||
|
./modules/system/apps-misc
|
||||||
|
./modules/system/browser
|
||||||
|
./modules/system/controller
|
||||||
|
./modules/system/flatpak
|
||||||
|
./modules/system/jovian-${hostName}
|
||||||
|
./modules/system/lact
|
||||||
|
./modules/system/plasma
|
||||||
|
./modules/system/retrodeck
|
||||||
|
./modules/system/steam
|
||||||
|
./modules/system/syncthing
|
||||||
|
./modules/system/sddm
|
||||||
|
{
|
||||||
|
# Device specific Home Manager Modules
|
||||||
|
home-manager.users.${user}.imports = userModules ++ [
|
||||||
|
./modules/user/plasma
|
||||||
|
];
|
||||||
|
# Issue with Plasma Manager, has to be imported in a special way
|
||||||
|
home-manager.sharedModules = [ plasma-manager.homeManagerModules.plasma-manager ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# Steamdeck config
|
# Steamdeck config
|
||||||
# user and hostName variable inside hostConfig so we can call it in other modules
|
|
||||||
steamdeck =
|
steamdeck =
|
||||||
let
|
let
|
||||||
user = "deck";
|
user = "deck";
|
||||||
@ -145,6 +146,7 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Konsole config
|
||||||
konsole =
|
konsole =
|
||||||
let
|
let
|
||||||
user = "deck";
|
user = "deck";
|
||||||
@ -184,7 +186,8 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
server =
|
# Server config
|
||||||
|
server =
|
||||||
let
|
let
|
||||||
user = "administrator";
|
user = "administrator";
|
||||||
hostName = "server";
|
hostName = "server";
|
||||||
@ -205,14 +208,12 @@
|
|||||||
./modules/system/syncthing
|
./modules/system/syncthing
|
||||||
{
|
{
|
||||||
# Device specific Home Manager Modules
|
# Device specific Home Manager Modules
|
||||||
home-manager.users.${user}.imports = userModules ++ [
|
home-manager.users.${user}.imports = userModules;
|
||||||
];
|
|
||||||
# Issue with Plasma Manager, has to be imported in a special way
|
# Issue with Plasma Manager, has to be imported in a special way
|
||||||
home-manager.sharedModules = [];
|
home-manager.sharedModules = [];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user