Compare commits
2 Commits
76ed533bd2
...
1adaee6051
Author | SHA1 | Date | |
---|---|---|---|
1adaee6051 | |||
473e6977ee |
22
flake.nix
22
flake.nix
@ -22,23 +22,17 @@
|
|||||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
# Available through 'nixos-rebuild --flake .#your-hostname'
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
# FIXME_ replace with your hostname
|
# 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
|
specialArgs = { inherit inputs; }; # Pass flake inputs to our config
|
||||||
# > Our main nixos configuration file <
|
# > 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 ];
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# You can also split up your configuration and import pieces of it here:
|
# You can also split up your configuration and import pieces of it here:
|
||||||
# ./users.nix
|
# ./users.nix
|
||||||
./network.nix
|
./network.nix
|
||||||
./i3.nix
|
../../roles/desktop.nix
|
||||||
|
|
||||||
# Import home-manager's NixOS module
|
# Import home-manager's NixOS module
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
@ -149,7 +149,7 @@
|
|||||||
extraSpecialArgs = { inherit inputs; };
|
extraSpecialArgs = { inherit inputs; };
|
||||||
users = {
|
users = {
|
||||||
# Import your home-manager configuration
|
# Import your home-manager configuration
|
||||||
mans = import ../home-manager/home.nix;
|
mans = import ../../../home-manager/home.nix;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -17,5 +17,5 @@
|
|||||||
|
|
||||||
|
|
||||||
# Set the hostname
|
# Set the hostname
|
||||||
networking.hostName = "nixos-mans";
|
networking.hostName = "nixos-desktop-mans";
|
||||||
}
|
}
|
@ -12,7 +12,7 @@
|
|||||||
# You can also split up your configuration and import pieces of it here:
|
# You can also split up your configuration and import pieces of it here:
|
||||||
# ./users.nix
|
# ./users.nix
|
||||||
./network.nix
|
./network.nix
|
||||||
./i3.nix
|
../../roles/desktop.nix
|
||||||
|
|
||||||
# Import home-manager's NixOS module
|
# Import home-manager's NixOS module
|
||||||
inputs.home-manager.nixosModules.home-manager
|
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.
|
# 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.
|
# Feel free to remove if you don't need it.
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
@ -143,7 +149,7 @@
|
|||||||
extraSpecialArgs = { inherit inputs; };
|
extraSpecialArgs = { inherit inputs; };
|
||||||
users = {
|
users = {
|
||||||
# Import your home-manager configuration
|
# Import your home-manager configuration
|
||||||
mans = import ../home-manager/home.nix;
|
mans = import ../../../home-manager/home.nix;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
21
nixos/machines/nixos-laptop-mans/network.nix
Normal file
21
nixos/machines/nixos-laptop-mans/network.nix
Normal 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
12
nixos/roles/base.nix
Normal 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
12
nixos/roles/desktop.nix
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../modules/i3.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
options = {
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
};
|
||||||
|
}
|
12
nixos/roles/server.nix
Normal file
12
nixos/roles/server.nix
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Module arguments which our system can use to refer to its own configuration
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
];
|
||||||
|
|
||||||
|
options = {
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user