Compare commits

...

2 Commits

Author SHA1 Message Date
1adaee6051 organize machines 2023-06-11 17:57:47 +02:00
473e6977ee reorder files 2023-06-11 17:53:13 +02:00
12 changed files with 77 additions and 20 deletions

View File

@ -22,23 +22,17 @@
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
# FIXME_ replace with your hostname
nixos-mans = nixpkgs.lib.nixosSystem {
nixos-desktop-mans = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; # Pass flake inputs to our config
# > Our main nixos configuration file <
modules = [ ./nixos/configuration.nix ];
modules = [ ./nixos/machines/nixos-desktop-mans/configuration.nix ];
};
nixos-laptop-mans = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; # Pass flake inputs to our config
# > Our main nixos configuration file <
modules = [ ./nixos/machines/nixos-laptop-mans/configuration.nix ];
};
};
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
# homeConfigurations = {
# # FIXME_ replace with your username@hostname
# "mans@nixos-mans" = home-manager.lib.homeManagerConfiguration {
# pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
# extraSpecialArgs = { inherit inputs; }; # Pass flake inputs to our config
# # > Our main home-manager configuration file <
# modules = [ ./home-manager/home.nix ];
# };
# };
};
}

View File

@ -12,7 +12,7 @@
# You can also split up your configuration and import pieces of it here:
# ./users.nix
./network.nix
./i3.nix
../../roles/desktop.nix
# Import home-manager's NixOS module
inputs.home-manager.nixosModules.home-manager
@ -149,7 +149,7 @@
extraSpecialArgs = { inherit inputs; };
users = {
# Import your home-manager configuration
mans = import ../home-manager/home.nix;
mans = import ../../../home-manager/home.nix;
};
};

View File

@ -17,5 +17,5 @@
# Set the hostname
networking.hostName = "nixos-mans";
networking.hostName = "nixos-desktop-mans";
}

View File

@ -12,7 +12,7 @@
# You can also split up your configuration and import pieces of it here:
# ./users.nix
./network.nix
./i3.nix
../../roles/desktop.nix
# Import home-manager's NixOS module
inputs.home-manager.nixosModules.home-manager
@ -127,6 +127,12 @@
};
};
environment.systemPackages = with pkgs; [
wget
neovim
openssl
];
# This setups a SSH server. Very important if you're setting up a headless system.
# Feel free to remove if you don't need it.
services.openssh = {
@ -143,7 +149,7 @@
extraSpecialArgs = { inherit inputs; };
users = {
# Import your home-manager configuration
mans = import ../home-manager/home.nix;
mans = import ../../../home-manager/home.nix;
};
};

View File

@ -0,0 +1,21 @@
# networking.nix
# Import the necessary modules
{ config, pkgs, ... }:
{
# Set the network interface configuration
# networking.interfaces.eth0.useDHCP = true;
networking.networkmanager.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ 22 ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Set the hostname
networking.hostName = "nixos-laptop-mans";
}

12
nixos/roles/base.nix Normal file
View File

@ -0,0 +1,12 @@
# Module arguments which our system can use to refer to its own configuration
{ config, lib, pkgs, ... }:
{
imports = [
];
options = {
};
config = {
};
}

12
nixos/roles/desktop.nix Normal file
View File

@ -0,0 +1,12 @@
{ config, lib, pkgs, ... }:
{
imports = [
../modules/i3.nix
];
options = {
};
config = {
};
}

12
nixos/roles/server.nix Normal file
View File

@ -0,0 +1,12 @@
# Module arguments which our system can use to refer to its own configuration
{ config, lib, pkgs, ... }:
{
imports = [
];
options = {
};
config = {
};
}

View File

@ -1,2 +1,2 @@
#!/usr/bin/env bash
sudo nixos-rebuild switch --flake .#nixos-mans
sudo nixos-rebuild switch --flake .#$(hostname)